package com.jdls.service.impl;

import com.jdls.dao.BookDao;
import com.jdls.pojo.Book;
import com.jdls.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 嘉德罗斯
 * @date 2021/9/16
 */
@Service
public class BookServiceImpl implements BookService {
    @Autowired
    private BookDao bookDao;

    public boolean add(Book book) {
        return bookDao.add(book);
    }

    public boolean update(Book book) {
        return bookDao.update(book);
    }

    public boolean delete(int id) {
        return bookDao.delete(id);
    }

    public Book findById(int id) {
        return bookDao.findById(id);
    }

    public List<Book> FindAll() {
        return bookDao.FindAll();
    }
}
